/*
 * @Description: 应用相关接口
 */
import axios from 'axios';
import Qs from 'qs';

// 登录，仅获取token
export function login(data) {
	const q = { ...data, scope: 'all' };
	const param = Qs.stringify(q);
	return axios.post('/sys-auth/oauth/token', param);
}

// 根据当前的应用ID获取应用配置
export function getNewClientConfig(paasProjectId) {
	return axios.get('/fusion-paas/project/paasProjectInfo', {
		params: {
			paasProjectId
		}
	});
}

export function getTs() {
	return axios({
		method: 'GET',
		url: '/sys-gateway/sign/ts',
		cMsg: true
	});
}
